package cn.edu.service;

import cn.edu.dao.IUser;
import cn.edu.dao.impl.IUserImpl;
import cn.edu.entity.User;

public class UserServiceImpl implements UserService {
    IUser iUser;

    @Override
    public boolean exites(String name) {
        iUser = new IUserImpl();
        try {
            return iUser.exites(name);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }

    @Override
    public boolean isLogon(User user) {
        iUser = new IUserImpl();
        try {
            return iUser.isLogon(user);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }

}
